<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>拼接</title>
</head>
<body>
    <h1>拼接</h1>
   <div th:object="${user}">
      <div th:text="'我叫'+*{name}+'今年'+*{age}+'岁'"></div>
     <div th:text="|我叫*{name}今年*{age}岁|"></div>
   </div>

</body>
</html>